package com.example.messagemodule.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.messagemodule.R;
import com.example.messagemodule.entity.LabelEntity;

import java.util.List;

public class LabelAdapter extends BaseQuickAdapter<LabelEntity.DataBean.LabelListBean, BaseViewHolder> {
    public LabelAdapter(@Nullable List<LabelEntity.DataBean.LabelListBean> data) {
        super(R.layout.item_labelpop, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, LabelEntity.DataBean.LabelListBean item) {
        helper.setText(R.id.label_item_name,item.getName());
        helper.setText(R.id.label_item_content,item.getLabelContent());
        helper.setText(R.id.label_item_from,"来源："+item.getSource());
    }
}
